Fix infinite recursion when invoked without args
authorMichael Gehring <mg@ebfe.org>
Thu, 6 Nov 2014 09:22:14 +0000 (10:22 +0100)
committerMichael Gehring <mg@ebfe.org>
Thu, 6 Nov 2014 09:22:14 +0000 (10:22 +0100)
src/bin/cargo.rs

index d0bdc10a9652fa34769c384ee3588604d354395c..ba55b00846df1ed8c922004e05712caa8d19330a 100644 (file)
@@ -102,7 +102,7 @@ fn execute(flags: Flags, shell: &mut MultiShell) -> CliResult<Option<()>> {
         "" | "help" if flags.arg_args.len() == 0 => {
             shell.set_verbose(true);
             let r = cargo::call_main_without_stdin(execute, shell, USAGE,
-                                                   ["-h".to_string()], false);
+                                                   [os::args()[0].clone(), "-h".to_string()], false);
             cargo::process_executed(r, shell);
             return Ok(None)
         }